x86/mm: Add per-page locking for memory sharing, when audits are disabled
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Jan 2012 12:46:26 +0000 (12:46 +0000)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Thu, 26 Jan 2012 12:46:26 +0000 (12:46 +0000)
commit6a11f31bd53381b925e67413e8230af8979e3807
treefad775401614a2662a24511f2600bb6f54aa98d2
parent3881f1a903ada4573be2eec5458a1defe5a34313
x86/mm: Add per-page locking for memory sharing, when audits are disabled

With the removal of the hash table, all that is needed now is locking
of individual shared pages, as new (gfn,domain) pairs are removed or
added from the list of mappings.

We recycle PGT_locked and use it to lock individual pages. We ensure deadlock
is averted by locking pages in increasing order.

The global lock remains for the benefit of the auditing code, and is
thus enabled only as a compile-time option.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Signed-off-by: Adin Scannell <adin@scannell.ca>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm.c
xen/arch/x86/mm/mem_sharing.c
xen/arch/x86/mm/mm-locks.h
xen/include/asm-x86/mm.h